
module.exports = [
  // tracibility
  {
    url: '/web/equipment',
    type: 'post',
    response: config => {
      var d = []
      switch (config.body.eventId) {
        case 1:
          d = { total: 2, lines: [
            { lineId: 1,
              lineNumber: '1',
              lineName: '电源',
              location: '二厂',
              priority: 3,
              description: '测试',
              manager: 'wp' },
            { lineId: 2,
              lineNumber: '2',
              lineName: '开关',
              location: '一厂',
              priority: 3,
              description: '测试',
              manager: 'wp' }] }
          break
        case 2:
          d = { lineId: 123,
            lineNumber: config.body.para.lineNumber,
            description: config.body.para.description,
            lineName: config.body.para.lineName,
            manager: config.body.para.manager,
            location: config.body.para.location,
            priority: config.body.para.priority }
          break
        case 3:
          d = { lineId: config.body.para.lineId,
            lineNumber: config.body.para.lineNumber,
            description: config.body.para.description,
            lineName: config.body.para.lineName,
            manager: config.body.para.manager,
            location: config.body.para.location,
            priority: config.body.para.priority }
          break
        case 4:
          break
        case 11:
          d = { total: 2, stations: [
            { stationId: 1,
              lineId: 1,
              stationNumber: '10',
              stationName: '机壳上料',
              processNumber1: '101',
              processName1: '高度测量',
              processNumber2: '102',
              processName2: '视觉检测',
              processNumber3: '103',
              processName3: '组装',
              processNumber4: '104',
              processName4: '试运行',
              processNumber5: '105',
              processName5: '下料' },
            { stationId: 2,
              stationNumber: '20',
              stationName: '安规测试',
              processNumber1: '201',
              processName1: '高压测试',
              processNumber2: '202',
              processName2: '绝缘测试',
              processNumber3: '',
              processName3: '',
              processNumber4: '',
              processName4: '',
              processNumber5: '',
              processName5: '' }] }
          break
        case 12:
          d = { stationId: 1,
            stationNumber: config.body.para.stationNumber,
            stationName: config.body.para.stationName,
            processNumber1: config.body.para.processNumber1,
            processName1: config.body.para.processName1,
            processNumber2: config.body.para.processNumber2,
            processName2: config.body.para.processName2,
            processNumber3: config.body.para.processNumber3,
            processName3: config.body.para.processName3,
            processNumber4: config.body.para.processNumber4,
            processName4: config.body.para.processName4,
            processNumber5: config.body.para.processNumber5,
            processName5: config.body.para.processName5 }
          break
        case 13:
          d = { stationId: 1,
            stationNumber: config.body.para.stationNumber,
            stationName: config.body.para.stationName,
            processNumber1: config.body.para.processNumber1,
            processName1: config.body.para.processName1,
            processNumber2: config.body.para.processNumber2,
            processName2: config.body.para.processName2,
            processNumber3: config.body.para.processNumber3,
            processName3: config.body.para.processName3,
            processNumber4: config.body.para.processNumber4,
            processName4: config.body.para.processName4,
            processNumber5: config.body.para.processNumber5,
            processName5: config.body.para.processName5 }
          break
        case 14:
          break
        case 21:
          d = { total: 2, processResults: [
            { processResultId: 1,
              processId: '1',
              resultCode: 'S010_001',
              resultName: '电压值',
              resultUnit: 'V',
              processName: '测试1' },
            { processResultId: 2,
              processId: '1',
              resultCode: 'S010_002',
              resultName: '电流值',
              resultUnit: 'A',
              processName: '测试2' },
            { processResultId: 3,
              processId: '1',
              resultCode: 'S010_003',
              resultName: '电流值',
              resultUnit: 'A',
              processName: '测试3' }] }
          break
        case 22:
          d = {
            processResultId: 4,
            resultCode: config.body.para.resultCode,
            resultName: config.body.para.resultName,
            resultUnit: config.body.para.resultUnit,
            processName: '测试',
            processId: config.body.para.processId }
          break
        case 23:
          d = {
            processResultId: config.body.para.resultCode,
            resultCode: config.body.para.resultCode,
            resultName: config.body.para.resultName,
            resultUnit: config.body.para.resultUnit,
            processName: '测试',
            processId: config.body.para.processId }
          break
        case 24:
          break
        case 31:
          d = { total: 3, processes: [
            { processId: '1',
              processNumber: '101',
              processName: '测试' },
            { processId: '2',
              processNumber: '102',
              processName: '测试2' },
            { processId: '3',
              processNumber: '103',
              processName: '测试3' }] }
          break
      }
      return {
        code: 20000,
        message: '',
        data: d
      }
    }
  }
]
